package com.kikyou.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author yuankaiqiang
 * @since 2022-03-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_department")
@ApiModel(value="Department对象", description="")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "组织ID")
    private String organizationId;

    @ApiModelProperty(value = "组织名称")
    private String organizationName;

    @ApiModelProperty(value = "父级组织")
    private Integer parentId;

    @ApiModelProperty(value = "路径")
    private String depPath;

    @ApiModelProperty(value = "组织类型")
    private String organizationType;

    @ApiModelProperty(value = "责任人(从员工类导入)")
    private Integer principald;

    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    @ApiModelProperty(value = "编制人数")
    private Integer enmNumber;
    @ApiModelProperty(value = "是否父级")
    private Integer isParent;

    @ApiModelProperty(value = "生效时间")
    private LocalDate effectiveTime;

    @ApiModelProperty(value = "失效时间")
    private LocalDate failureTime;

    @ApiModelProperty(value = "备注信息")
    private String remark;

    @TableLogic
    @ApiModelProperty(value = "逻辑删除字段")
    private Boolean deleted;

    @TableField
    @ApiModelProperty(value = "children")
   private List<Department> children;

    @ApiModelProperty(value = "存储过程返回结果")
    @TableField(exist = false)
    private Integer result;
}
